﻿
using Channelvn.Cached;
using Core.Library;

namespace DataObject.Ref
{
    public class RefCache
    {
        public static string Ref_GetBannerHome()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetBannerHome", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (string)fromcache;
            }
            else
            {
                string o = RefController.Ref_GetBannerHome();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static string Ref_GetStringEmailClone()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetStringEmailClone", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (string)fromcache;
            }
            else
            {
                string o = RefController.Ref_GetStringEmailClone();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetLockCloneStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetLockCloneStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetLockCloneStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetTimelineDisplayStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetTimelineDisplayStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetTimelineDisplayStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetVoteDisplayStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetVoteDisplayStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetVoteDisplayStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetCheatVoteStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetCheatVoteStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetCheatVoteStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetStartContestStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetStartContestStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetStartContestStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }


        public static bool Ref_GetMemberBreakCacheStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetMemberBreakCacheStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetMemberBreakCacheStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetLockVoteStatus()
        {
            var listParams = new object[] {};
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetLockVoteStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetLockVoteStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static int Ref_GetCurrentRound()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetCurrentRound", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (int)fromcache;
            }
            else
            {
                int o = RefController.Ref_GetCurrentRound();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetLockRegisterStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetLockRegisterStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetLockRegisterStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetLockEditStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetLockEditStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetLockEditStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }

        public static bool Ref_GetLockUploadStatus()
        {
            var listParams = new object[] { };
            var cacheName = CacheHelper.CacheKey.GetCacheKey("Ref_GetLockUploadStatus", listParams);
            var fromcache = CacheController.GetCache(Constants.CONFIG_CACHE_CATEGORY, cacheName);
            if (fromcache != null)
            {
                return (bool)fromcache;
            }
            else
            {
                bool o = RefController.Ref_GetLockUploadStatus();
                CacheController.Add(Constants.CONFIG_CACHE_CATEGORY, cacheName, o, Constants.DATA_CACHE_EXPIRE);
                return o;
            }
        }
    }
}
